package org.compression.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.model.auth.Bussine;
import org.model.business.BookMagament;
import org.model.comm.Page;

@Mapper
public interface BookMagamentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(BookMagament record);

    int insertSelective(BookMagament record);

    BookMagament selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BookMagament record);

    int updateByPrimaryKey(BookMagament record);
    
    
    @Select("select * from t_new_magazine limit #{currentPageNum},#{pageSize}")
 	public List<BookMagament> getPageBookMagament(Page mPage);
    
    
    @Select("select count(*) from t_new_magazine")
 	public long getTotal();

    @Select("select * from t_new_magazine where name like CONCAT('%',#{name},'%') ")
	public List<BookMagament> selectName(BookMagament mBookMagaments);
    
    @Insert("insert into t_new_magazine (name) values (#{name})")
    @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
    public int insertBookMagament(BookMagament mBookMagament); 
  
    @Insert("insert into t_new_magazine (name,createdate,attr) values (#{name},#{createdate},#{attr})")
    @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
    public int insertBookMagamentDate(BookMagament mBookMagament); 
    
    
    @Select("select id from  t_new_magazine  where createdate=#{createdate}")
    public List<Integer> selectCreateTime(String createdate); 
    
    
  
    
    @Select("select id from  t_new_magazine  where attr=#{attr}")
    public List<Integer> selectUUID(String attr); 
    
    
    
    
    
    
    
    
}